import React from "react";
import StoFilter from "../components/StoFilter/StoFilter";
import { getStudents } from "../common/mockdata";

const students = getStudents(1);

const filters = [
  {
    type: "text",
    placeholder: "请输入用芳名",
    key: "name",
  },

  {
    type: "select",
    options: ["男", "女", "死变态", "二椅子"],
    placeholder: "请选择性别",
    key: "gender",
  },

  {
    type: "number",
    placeholder: "年龄",
    key: "age",
  },
];

const onReset = () => {
  console.log("用户点击了重置");
};

const onSearch = (values: any[]) => {
  console.log("用户点击了搜索", values);
};

export default function FilterDemo() {
  return (
    <div style={{ width: 1000 }}>
      <h3>FilterDemo</h3>

      <StoFilter
        filters={filters}
        onReset={onReset}
        onSearch={onSearch}
      ></StoFilter>
    </div>
  );
}
